//
//  myStatisticsView.m
//  兼职页面
//
//  Created by kuiyuan liang on 2021/5/23.
//

#import "myStatisticsView.h"
#import "CommonUtil.h"

#import "LeftTitleView.h"
#import "ContentView.h"
#import "BottomView.h"

@interface myStatisticsView ()

@property (strong, nonatomic) LeftTitleView * leftTitleView;
@property (strong, nonatomic) ContentView * contentView;
@property (strong, nonatomic) BottomView * bottomView;

@end

@implementation myStatisticsView

-(instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        [self addSubview:self.leftTitleView];
        [self addSubview:self.contentView];
        [self addSubview:self.bottomView];
        self.backgroundColor = RGB(243.0, 243.0, 243.0);
    }
    return self;
}


- (LeftTitleView *)leftTitleView{
    if (!_leftTitleView) {
        CGFloat h = self.height  - self.bottomView.height;
        _leftTitleView = [[LeftTitleView alloc] initWithFrame:CGRectMake(0, 0, AD(70), h)];
    }
    return _leftTitleView;
}

- (ContentView *)contentView{
    if (!_contentView) {
        _contentView = [[ContentView alloc] initWithFrame:CGRectMake(_leftTitleView.right, 0, SCREEN_WIDTH-_leftTitleView.width, _leftTitleView.height)];
    }
    return _contentView;
}

-(BottomView *)bottomView{
    if (!_bottomView) {
        _bottomView = [[BottomView alloc] initWithFrame:CGRectMake(0, self.height-AD(80), SCREEN_WIDTH, AD(80))];
    }
    return _bottomView;
}

@end
